package com.zhu.ssm.pojo;

import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

@Data
public class User {

    private Long id;

    @NotNull(message = "姓名不可以为空")
    private String name;
    @Min(value = 18,message = "年龄不能小于18")
    @Max(value = 50,message = "不可以大于50岁")
    private Integer age;
    private String email;
}
